<template>
    <div class="home__head">
      <div class="home__head--img"></div>
      <div class="home__head--text">
        <div class="home__head--text1">点击Write Down开始尝试！！！</div>
        <div class="home__head--text2">Turn your Dream into a Film</div>
        <div class="home__head--text3">
          <div @click="writeScript">Write down</div>
          <div>your</div>
          <div>story</div>
          <div>, or</div>
          <div @click="createProject">Produce</div>
          <div>it</div>
        </div>
      </div>

      <div class="home__head--title">How to make a movie with MineStudio</div>
      <div class="home__head--icon"></div>
      <div>
        <no-ssr>
            <PopupDemo :visible="isShowScriptTip"
                        @closeCallBack="isShowScriptTip = false" />
        </no-ssr>
      </div>
    </div>
   
</template>

<script>
import PopupDemo from '../../components/popup/PopupDemo.vue';
export default {
    name: "HelloWorld",
    layout: 'test', //默认的使用default.vue
    //只有在pages目录下的VUE代码才可以使用asyncData，fetch，head三个方法
    asyncData(context) {
        // called every time before loading the component
        return { name: "The data From asyncData()" };
    },
    fetch() {
        // The fetch method is used to fill the store before rendering the page
    },
    head() {
        // Set Meta Tags for this Page
    },
    components: { PopupDemo },
    data(){
        return{
            isShowScriptTip: false,
        }
    },
    computed:{},
    mounted() {},
    methods: {
        writeScript() {
            this.isShowScriptTip = true;
        },
        createProject() {
            console.log("===")
        }
    },                                                                                                                                                                                                                                                                                                                                    
}
</script>

<style lang="less" scoped>
.home__head {
  position: relative;
  width: 100%;
  height: 100vh;
  max-height: 768px;
  background-image: linear-gradient(to top, rgb(249, 249, 249) 0%, rgba(0,0,0,0) 90%);
  &::after {
    content: '';
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: #ff6225;
  }
  &--img {
    position: absolute;
    left: 10%;
    top: 10%;
    width: 406px;
    height: 544px;
    background: center/cover url(../../static/home_head_img.png) no-repeat;
  }
  &--text {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: absolute;
    right: 15%;
    top: 25%;
  }
  &--text1 {
    width: 472px;
    height: 22px;
    font-family: Nunito;
    font-style: normal;
    font-weight: normal;
    font-size: 16px;
    line-height: 22px;
    color: #04051b;
  }
  &--text2 {
    width: 582px;
    height: 158px;
    font-family: Libre Baskerville;
    font-style: normal;
    font-weight: normal;
    font-size: 64px;
    line-height: 79px;
    text-align: right;
    color: #7c2323;
    text-shadow: 0px 0px 0px rgba(233, 19, 55, 0.5);
  }
  &--text3 {
    display: flex;
    align-items: center;
    div:nth-child(1) {
      width: 158px;
      height: 47px;
      background: #ff6225;
      border: 1px solid #ff6225;
      box-sizing: border-box;
      border-radius: 24px;
      color: #ffffff;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }
    div:nth-child(2) {
      padding-left: 10px;
      font-weight: normal;
      font-size: 18px;
      line-height: 25px;
      display: flex;
      align-items: center;
      color: #56230f;
    }
    div:nth-child(3) {
      padding-left: 10px;
      font-size: 36px;
      display: flex;
      align-items: center;
      color: #56230f;
    }
    div:nth-child(4) {
      padding-right: 10px;
      font-size: 18px;
      line-height: 25px;
      display: flex;
      align-items: center;
      color: #56230f;
    }
    div:nth-child(5) {
      width: 127px;
      height: 47px;
      background: #ff6225;
      border: 1px solid #ff6225;
      box-sizing: border-box;
      border-radius: 24px;
      color: #ffffff;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }
    div:nth-child(6) {
      font-size: 36px;
      line-height: 49px;
      display: flex;
      align-items: center;
      color: #56230f;
      padding-left: 10px;
    }
  }
  &--title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 100px;
    width: 425px;
    height: 88px;
    font-family: Libre Baskerville;
    font-style: normal;
    font-weight: bold;
    font-size: 30px;
    line-height: 37px;
    text-align: center;
    color: #56230f;
    text-shadow: 0px 0px 0px rgba(0, 0, 0, 0.5);
  }
  &--icon {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: center/cover url(../../static/home_head_icon.png) no-repeat;
  }
}
</style>
